{$CLEO .qa}
{$USE CLEO+}
{$USE newOpcodes}
{$USE ini}

0000: NOP

script_name "GasB"

// By ArtemQa146

if and
    056E:   car 1@ defined
    0@ == true
then
    0390: load_txd_dictionary "GSMOD"
    038F: load_texture "GSST3" as 1  // Load dictionary with 0390 first
    0E3C: get_texture_from_sprite 1 store_to 31@
    0391: release_textures

    //    
    0E2A: add_cleo_blip 31@ position -2192.2026 2451.7988 is_short 1 RGBA 255 255 255 255 store_to 30@
    0E2A: add_cleo_blip 31@ position 2313.3 514.686 is_short 1 RGBA 255 255 255 255 store_to 29@
    0E2A: add_cleo_blip 31@ position -1679.1454 1476.456 is_short 1 RGBA 255 255 255 255 store_to 28@
    0E2A: add_cleo_blip 31@ position -1635.8868 187.7887 is_short 1 RGBA 255 255 255 255 store_to 27@
    0E2A: add_cleo_blip 31@ position 192.7418 -1947.5878 is_short 1 RGBA 255 255 255 255 store_to 26@
    0E2A: add_cleo_blip 31@ position 2702.3762 -2294.0823 is_short 1 RGBA 255 255 255 255 store_to 25@
    0E2A: add_cleo_blip 31@ position 258.6 2959.2 is_short 1 RGBA 255 255 255 255 store_to 24@

    repeat
    wait 0
    if
        80DF:   not actor $PLAYER_ACTOR driving
    then
        break
    end
    
    //      
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos -2192.2026 2451.7988 1.4503 radius 100.0
    then
        2@ = -2192.2026
        3@ = 2451.7988
        4@ = 5.4503
        gosub @Icon //   
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos -1679.1454 1476.4565 1.2309 radius 100.0
    then
        2@ = -1679.1454
        3@ = 1476.4565
        4@ = 5.4503
        gosub @Icon
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos -1635.8868 187.7887 0.6777 radius 100.0
    then
        2@ = -1635.8868
        3@ = 187.7887
        4@ = 5.4503
        gosub @Icon
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos 192.7418 -1947.5878 1.4659 radius 100.0
    then
        2@ = 192.7418
        3@ = -1947.5878
        4@ = 5.4503
        gosub @Icon
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos 2702.3762 -2294.0823 1.4937 radius 100.0
    then
        2@ = 2702.3762
        3@ = -2294.0823
        4@ = 5.4503
        gosub @Icon
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos 2313.3 514.686 1.6188 radius 100.0
    then
        2@ = 2313.3
        3@ = 514.686
        4@ = 5.4503
        gosub @Icon
    end
    
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos 258.6 2959.2 1.0 radius 100.0
    then
        2@ = 258.6
        3@ = 2959.2
        4@ = 5.4503
        gosub @Icon
    end
    
    until not player.Defined(0)
    
    //          ,     
    0E2B: remove_cleo_blip 30@
    0E2B: remove_cleo_blip 29@
    0E2B: remove_cleo_blip 28@
    0E2B: remove_cleo_blip 27@
    0E2B: remove_cleo_blip 26@
    0E2B: remove_cleo_blip 25@
    0E2B: remove_cleo_blip 24@
end

0A93: terminate_this_custom_script //  


:Icon
    if
        0EEA: locate_char_distance_to_coordinates $PLAYER_ACTOR pos 2@ 3@ 4@ radius 100.0
    then
        if
            0E3F: convert_3d_to_screen_2d 2@ 3@ 4@ checkNearClip 1 checkFarClip 1 store_2d_to 5@ 6@ size_to 7@ 7@
        then
            0EB2: get_offset_from_camera_in_world_coords 0 0 0 store_to 8@ 9@ 10@ //    
            050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 8@ 9@ 10@ //     
            
            // 
            0087: 10@ = 8@ // (float)
            10@ *= 5.0
            if 10@ <= 110.0
            then 10@ = 110.0
            end
            006B: 7@ *= 10@  // (float)
            
            // 
            8@ *= 3.0
            0092: 8@ = float 8@ to_integer
            9@ = 255
            0062: 9@ -= 8@  // (int)
            if 9@ < 0
            then 9@ = 0
            end
            if 9@ > 100
            then 9@ = 100
            end
            
            0E1E: draw_texture_plus 31@ event 1 pos 5@ 6@ size 7@ 7@ angle 0.0 depth 0 fix_aspect_ratio 1 maskTrisCount 0 maskTrisArray 0 rgba 255 255 255 9@
        end
    end
return
